1. Field of Invention
The present invention relates to a data accessing method and an apparatus for performing the method. More particularly, the present invention relates to a data accessing method and an apparatus which can correctly find the corresponding logical drive for accessing data without identifying an identity of a host when processing an Input/Output (IO) request issued from the host.
2. Description of Related Art
In the modern societies, storage systems/subsystems are widely applied on daily life for meeting various demands. A redundant array of independent disk (RAID) is one of the popular storage subsystems, which can increase data-accessing performance and provide fault-tolerance capability to data besides providing a large amount of storage space. In accordance with different applications, one or more RAIDs can be connected to one or more hosts through host-side interconnect interfaces, thereby integrally forming a storage system. In the storage system, the host accesses data in the RAID to meet the demands of its own application programs.
The RAID is also a storage virtualization subsystem, and the controller therefore is referred to as a storage virtualization controller (SVC), which combines sections of physical storage devices (PSDs) into a logical storage entity by using a storage virtualization technology. The logical storage entity in the RAID is referred to as a logical drive (LD), and the logical storage entity is referred to as a logical unit (LUN) while being mapped out to be accessed by a host.
Hence, from the viewpoint of the host, a host command issued by it is directed to a recognizable LUN. After receiving the host command, the SVC first parses and interprets the host command to determine which logical drive or which partition thereof (referred to as an LD/partition hereinafter) is associated with the LUN to be accessed by the host. Thereafter, the related operation is parameters and data are translated into an IO request targeting a PSD at which the LD/partition is located.
There are two mapping types between the LUN and the logical drive, including global mapping and host-specific mapping. The global mapping indicates that the LD/partition linked to one certain LUN is used for storing global data, i.e., all of the hosts may access data in the LD/partition, wherein the mapping relationship between the LUN and the LD/partition is one-to-one or many-to-one. The host-specific mapping indicates that the LD/partition linked to one certain LUN is used for storing local data, i.e., only some specific hosts may access data in the LD/partition, wherein the mapping relationship between the LUN and the LD/partition is one-to-many, many-to-one or one-to-one. Under the situation of global mapping, the same LUN seen by a plurality of hosts must be mapped to the same LD/partition, i.e., the plurality of hosts may access data in the same LD/partition via the same LUN. In contrast, under the situation of host-specific mapping, although a plurality of hosts, have seen the same LUN, yet in fact, they are mapped respectively to different logical drives (LDs)/partitions via the LUN. When receiving a host IO request issued from a host, a controller determine an LD/partition mapped to the host in accordance with the result of host identity (ID) recognition, such that each of the plurality of hosts merely can access data of its corresponding LD/partition, thereby achieving the object of access control.
Under the situation of host-specific mapping, it is an important issue in the storage industry about how to enable the SVC to correctly map the host commands issued by different hosts to their corresponding LDs/partitions.